Resources and References
Python Django
- Dockerizing a Python Django Web Application
- Dockerizing Django with Postgres, Gunicorn, and Nginx
- Get Started With Django Part 1: Build a Portfolio App
- Securely Deploy a Django App With Gunicorn, Nginx, & HTTPS
- How to Use Bootstrap 4 Forms With Django
Django API
- An introduction to the Django ORM
- Build a REST API in 30 minutes with Django REST Framework
- Rest API Guide
Django REST API Token
- Token Based Authentication for Django Rest Framework
- How to Implement Token Authentication using Django REST Framework
## Create Token
./manage.py drf_create_token <username>
## regenerate token
./manage.py drf_create_token -r <username>
Django Pagination
Ansible Runner
- Using Runner as a Python Module Interface to Ansible
- Running with Ansible Runner
- Ansible Runner Examples
- how to use ansible runner programatically
ansible-runner -p my_playbook.yml run /path/to/my/project
import ansible_runner
r = ansible_runner.run(private_data_dir='/tmp/demo', playbook='test.yml')
print("{}: {}".format(r.status, r.rc))
# successful: 0
for each_host_event in r.events:
print(each_host_event['event'])
print("Final status:")
print(r.stats)
Passing inventory to ansible runner
The ansible_runner.run() accepts following values for inventory parameter.
- Path to the inventory file in the private_data_dir
- Native python dict supporting the YAML/json inventory structure
- A text INI formatted string
- A list of inventory sources, or an empty list to disable passing inventory
Default value, if not passed, for this parameter is private_data_dir/inventory directory. Passing this parameter overrides the inventory directory/file.
Jekyll inside a container
Docker/Podman/Kuebrnetes
podman run –rm
–volume=”$PWD:/srv/jekyll:Z”
-p 4000:4000
jekyll/jekyll
jekyll serve
podman run -dt -p 32080:8000/tcp localhost/openguard-doc
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.